<template>
	<view  class="contain" style="height: 100%;">
		<!-- <nav-bar :titleCenter="true" backState="2000" :bgColor="['#FFFFFF','#FFFFFF']" bgColorAngle="90" fontColor="#000"
		 title="详情">
			<view class="preview tab-left-icon iconfont icon-left" slot="left" @click="goback"></view>
			<view slot="right" class="search_box" style="margin-right: 30rpx;" @click="btnClick">
				<text style="margin-left: 10rpx;font-size:38rpx" class="iconfont icon-weibiaoti-21 grace-black"></text>
			</view>
		</nav-bar> -->
		<view style="margin-top: 15px;">
			<view class="">
			    <view class="grace-text1 grace-margin-top">{{banner.newsTitle}}</view>
			</view>
			<view style="margin-top: 15px;">
			    <text class="grace-text">{{banner.newsAuthor}}</text>
			    <text class="grace-text2" style="margin-left: 10rpx;">发表于</text>
			    <text class="grace-text2"style="margin-left: 10rpx;">{{banner.createTime}}</text>
			</view>
			<view class="img-Detail" style="margin-top: 15px;">
				<jyf-parser :html="banner.newsDetail" ref="article"></jyf-parser>
			</view>
		</view>
        
	 </view>
</template>
<script>
	import jyfParser from "../components/jyf-parser/jyf-parser";
	// import graceSwiper from "../../graceUI/components/graceSwiper.vue";
	// import gracePage from "../../graceUI/components/gracePage.vue";
    export default { 
        data() {
            return {
                title: 'list-triplex-row',
                banner: {},
                htmlString: "",
				swiperItems:[],
				
				smilSpot:true
            }
        },
        onLoad(event) {
			
           
                this.banner = JSON.parse(decodeURIComponent(event.detailDate));
			
        },
		components: {
			jyfParser
		},
        methods: {
            btnClick(){
				let that = this;
				let id = that.banner.id;
				console.log("id",id)
				uni.navigateTo({
					url:"tournamentEdit?id=" + id,
				})
			},
			taped(e){
				let imgIndex = e;
				var imgArr = [];
				this.swiperItems.forEach(function(item,index){
					imgArr.push(item.img)
				});	
				//预览图片
				uni.previewImage({
					urls: imgArr,
					current:imgArr[imgIndex]
				});

			},
			goback(){
				uni.navigateTo({
					url:"tournamentList"
				})
			}
        }
    }
</script>
<style>
	.grace-body{
		background-color: #FFFFFF;height: 100%;
	}
</style>
<style scoped lang="less">
	.contain{
		padding: 0 40rpx;
	}

	
	.grace-text1{
		font-size: 34rpx;
		font-family: PingFang SC;
		font-weight: bold;
		color: #333333;
		opacity: 1;
		letter-spacing:1rpx;
		
	}
	.grace-text2{
		font-size: 24rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #999999;
		opacity: 1;
		letter-spacing:2rpx;
	}
	
	.img-Detail {
		padding-bottom: 60rpx;
	}
	
	
	.img-Detail /deep/ p{
		font-size: 28rpx;
		margin-top:20rpx;
		color: #141414;
		line-height:50rpx;
		letter-spacing: 2rpx;
		text-indent: 2em;
	}
	
	.img-Detail /deep/ img{
		display:block;
	}
	
</style>
